  <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="com.wanmait.shoppingsys.util.ManagePager"%>
<%@page import="java.util.List"%>
<%@page import="com.wanmait.shoppingsys.vo.Evaluation"%>
<!DOCTYPE html> 
 <jsp:include page="/EvaluationAllController" ></jsp:include> 
 <%
String path = request.getServletContext().getContextPath();
%>  
<jsp:include page="/manageinc/header.jsp"></jsp:include>
<section>
<h1>用户评论</h1>
<table width="100%" border="1">
<th>序号</th>
<th>用户</th>
<th>特产</th>
<th>内容</th>
<th>评论时间</th>
<th>操作</th>

<% 
 ManagePager managepager=(ManagePager)request.getAttribute("managerpager");
List<Evaluation> evaluations = (List<Evaluation>)managepager.getData(); 
for(int i=0;evaluations!=null&&i<evaluations.size();i++){
	Evaluation evaluation=evaluations.get(i);
%>
<tr>
<td><%=i+1%></td>
<td><%=evaluation.getUesrinfo().getName() %></td>
<td><%=evaluation.getSpecialty().getName()%></td>
<td><%=evaluation.getContent() %></td>
<td><%=evaluation.getTime() %></td>
 <td><a href="/ShoppingSys/EvaluationController?action=delete&id=<%=evaluation.getId()%>">删除</a></td> 
</tr>
<%
}
%></table>
<div class="pagenation">
<%if(managepager.hasPrev()){ %>
<a href="<%=path%>/manage/evaluation?action=evaluation&pageNum=<%=managepager.getPageNum()-1%>">&lt;&lt;</a>
<%
} 
%>
<%-- <%
int k=0;
	for(int i=1;i<=managepager.getPageCount();i++){
		k++;
		%>
<a href="<%=path%>/manage/evaluation?action=evaluation&pageNum=<%=i%>"  class="<%=managepager.getPageNum()==i?"cur":"" %>"  ><%=i %></a>
<%if(k==5){break;} %>
	<%
	}
	%> --%>
	
	  <%
				int k = 0;
				for(int i=managepager.getPageNum();i<=managepager.getPageCount();i++){
					k++;
				%>
				<a href="<%=path%>/SpecialtyManageController?action=evaluation&pageNum=<%=i%>"  class="<%=managepager.getPageNum()==i?"cur":"" %>"  ><%=i %></a>	
				<%if(k==5){break;} %>
				<%
	}
	%>
<%if(managepager.hasNext()) {%>
<a href="<%=path%>/manage/evaluation?action=evaluation&pageNum=<%=managepager.getPageNum()+1%>">&gt;&gt;</a>
<%} %>	

</div>
</section>
<%-- <jsp:include page="/manageinc/footer.jsp"></jsp:include>   --%>